---
layout: null
permalink: /community/
title: Community
subtitle: How science is done and for what.
description: Xiaodong's self-described contribution to the community.
---
<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="utf-8">
    <title>{{ title }}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv = "X-UA-Compatible" content = "IE = edge">
    <meta name="subtitle" content="{{ page.subtitle }}">
    {% if site.author.OtherName %}
    <meta name="author" content="{{site.author.name}} | {{site.author.OtherName}}">
    {% else %}
    <meta name="author" content="{{site.author.name}}">
    {% endif %}
    {% include metadata.html %}

    <!-- Le styles -->
    <!-- Le styles -->
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/quattrocento-sans" type="text/css"/>
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/rosario" type="text/css"/>
    <!-- Bootstrap -->
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
    <link href = "{{ site.baseurl }}/assets/css/bootstrap.min.css" rel = "stylesheet">
    <!-- Self-defined style -->
    <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/style.css">

    <!-- favicon -->
    <link rel="apple-touch-icon" sizes="57x57" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192"  href="{{ site.baseurl }}/assets/img/favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/assets/img/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="{{ site.baseurl }}/assets/img/favicon/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/assets/img/favicon/favicon-16x16.png">
    <link rel="manifest" href="{{ site.baseurl }}/assets/img/favicon/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="{{ site.baseurl }}/assets/img/favicon/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">

    <!-- Le javascript -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src = "https://code.jquery.com/jquery.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src = "{{ site.baseurl }}/assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="{{ site.baseurl }}/assets/js/strftime.js"></script>
    <script type="text/javascript">
    (function ($, undefined) {

      // Put custom repo URL's in this object, keyed by repo name.
      var repoUrls = {
      };
      // Put custom repo descriptions in this object, keyed by repo name.
      var repoDescriptions = {
      };
      var repos = [];

      function repoUrl(repo) {
        return repoUrls[repo.name] || repo.html_url;
      }
      function repoDescription(repo) {
        return repoDescriptions[repo.name] || repo.description;
      }

      function addRecentlyUpdatedRepo(repo) {
        var $item = $("<li>");

        var $name = $("<a>").attr("href", repo.html_url).text(repo.name);
        $item.append($("<span>").addClass("name").append($name));

        var $time = $("<a>").attr("href", repo.html_url + "/commits").text(strftime("%h %e, %Y", repo.pushed_at));
        $item.append($("<span>").addClass("time").append($time));

        $item.append('<span class="bullet">&sdot;</span>');

        var $open_issues = $("<a>").attr("href", repo.html_url + "/open_issues").text(repo.open_issues + " open_issues");
        $item.append($("<span>").addClass("open_issues").append($open_issues));

        var $watchers = $("<a>").attr("href", repo.html_url + "/watchers").text(repo.watchers + " watchers");
        $item.append($("<span>").addClass("watchers").append($watchers));

        $item.append('<span class="bullet">&sdot;</span>');

        var $forks = $("<a>").attr("href", repo.html_url + "/network").text(repo.forks + " forks");
        $item.append($("<span>").addClass("forks").append($forks));

        $item.appendTo("#recently-updated-repos");
      }

      function addRepo(repo) {
        var $item = $("<li>").addClass("repo rep " + (repo.language || '').toLowerCase());
        var $link = $("<a>").attr("href", repoUrl(repo)).appendTo($item);
        $link.append($("<h2>").text(repo.name));
        // $link.append($("<h3>").text(repo.watchers + " watchers" + " / " + repo.open_issues + " open issues"));
        $link.append($("<p style='line-height:1em;'>").text(repoDescription(repo)));
        //$link.append($("<p style='line-height:1em;'>").text("Updated " +
        //  strftime("%h %e, %Y", repo.pushed_at)));
        $link.append($("<h3 style='top:23px; right:1px;'>").addClass("language").text(repo.language));

        $item.appendTo("#repos");
      }

      // The following way of querying multiple urls is inspired by blog http://blog.timsommer.be/using-promises-to-merge-async-jquery-ajax-calls/
      // and discussion with Jake on https://forum.jquery.com/topic/how-to-use-ajax-or-getjson-to-query-multiple-urls-and-then-sort-the-combined-data?reply=true.
      // More about promises and deferred queries in jQuery may be found at http://www.nurkiewicz.com/2013/03/promises-and-deferred-objects-in-jquery.html.
      //var tokenkey='9594d317ed5';
      var promises=[]; //to store the array of returned promises of each query.
      var temprepos=[];
      // This is to return the promises of every query on different urls.
      function queryorgrepo(requrl){
      return $.ajax({
         url: requrl,
         //async: false,
         dataType: 'json',
         //headers: 'Authorization: token '+tokenkey,
         success: function () {
         //We only need results.data in the end. Is this blank function correct?
         // return result.data;
         }
       });
      };

        // Call organization names from the YAML.
      var orgnames =
        [{% for item in site.author.ghorgs %}
          {% if forloop.last != true %}
           '{{ item.name }}',
          {% else %}
           '{{item.name}}'
          {% endif %}
        {% endfor %}];
      //Define url list as a combination of user's url and the orgs' urls.
      var orgurls = ['https://api.github.com/users/{{site.author.github}}/repos?per_page=100&callback=?'];
      for (var indx = 0; indx < orgnames.length; indx++){
        orgurls[indx + 1] = "https://api.github.com/orgs/"+orgnames[indx]+"/repos?per_page=100&callback=?";
      };
      for (var indx = 0; indx < orgurls.length; indx++){
        //add promises in each loop of query.
        promises.push(queryorgrepo(orgurls[indx]));
       }
      // Invoke each function stored in the result array and proceed when they are all done
      $.when.apply(this, promises).done(function () {
      // Fetch the result from each arguments.
      var tempdata = [];
      // Each argument contains the result of one succes ajax function.
      // in this case, three arguments exist, one for each ajax call.
        for (var i = 0; i < arguments.length; i++) {
        // retrieve the entries from the argument parameter
          values = arguments[i][0].data;
          //console.log(values);
         // Push the retrieved value to a global function variable, which we can.
         // this function is processed synchronously, when all ajax calls have been completed
         tempdata.push(values);
        };

      // merge the arrays to get the collected repos.
      for (var i = 0; i < tempdata.length; i++) {
        $.merge(repos, tempdata[i]);
      };
      // sort the repos and define html elememts.
      $(function () {
          $("#num-repos").text(repos.length);
          // Convert pushed_at to Date.
          $.each(repos, function (i, repo) {
            repo.pushed_at = new Date(repo.pushed_at);

            var weekHalfLife  = 1.146 * Math.pow(10, -9);

            var pushDelta    = (new Date) - Date.parse(repo.pushed_at);
            var createdDelta = (new Date) - Date.parse(repo.created_at);

            var weightForPush = 1;
            var weightForWatchers = 1.314 * Math.pow(10, 7);

            repo.hotness = weightForPush * Math.pow(Math.E, -1 * weekHalfLife * pushDelta);
            repo.hotness += weightForWatchers * repo.watchers / createdDelta;
          });

          // Sort by highest # of watchers.
          repos.sort(function (a, b) {
            if (a.hotness < b.hotness) return 1;
            if (b.hotness < a.hotness) return -1;
            return 0;
          });
          // Only first 12 hotest repos are shown.
          $.each(repos.slice(0,12), function (i, repo) {
            addRepo(repo);
          });

          // Sort by most-recently pushed to.
          repos.sort(function (a, b) {
            if (a.pushed_at < b.pushed_at) return 1;
            if (b.pushed_at < a.pushed_at) return -1;
            return 0;
          });

          $.each(repos.slice(0, 3), function (i, repo) {
            addRecentlyUpdatedRepo(repo);
          });
        });//function
      }); //when.apply.done

    })(jQuery);
    </script>
  </head>
<body>

  {% include navbar.html %}


<div class="container"> <!-- Twitter bootstrap has all body content in a container -->
<header class="jumbotron subhead">
    <h1 class="entry-title">{{ page.title }}</h1>
    <p>{{ page.subtitle }}</p>
</header>

    <div class="row">
      <p>This is a fast developing world. Data streams are expanding exponentially.
          Man-made machines are gaining new capacity every day to replace human forces in every possible area.
          Today, increasing number of scientists and engineers, including me, are working on the quantum information frontier to build the fundation for making machines in extreme complexity, which will be eventually more intelligent and efficient than ourselves in terms of processing information and creating new ideas.
          As far as I can see, we are approaching to a critical point that a revolution will dramatically change our personal life, ways of doing research, teaching and working, relationships among people and things, and ultimately the social structure of the human world.
          We need to rethink about and rebuild our purpose of living, our common sense, moral standards, law systems, policies and the attribution model of profits, knowledge and tools--before it is too late.
      </p>
      <p>As a scientist, I am taking some time off to develop tools, to share my works and to organize some social activities.
         If you find those are opportunities for your to take advantage and participation of, I'd be more than happy to welcome you to the journey of defining sustainable development of humanity.
      </p>

      <!--<div class="row">
         <h2>Callout: JuliaQuantum is discussing the coming Google Summer of Code projects for 2016. Come to join <a href="https://github.com/JuliaQuantum/JuliaQuantum.github.io/issues/32" target="_blank">our discussion</a>.</h2>
      </div> -->

      <div class="row">
       <h2>Non-for-profit organizations that I co-created for communities:</h2>
       <ul style="list-style-type:row">
        <li><a href="http://cquic.github.io/" target="_blank">CQuIC@GitHub</a>: for CQuIC members who do code for science. </li>
        <li><a href="http://juliaquantum.github.io/" target="_blank">JuliaQuantum</a>: for establishing standards and computational libraries in Julia for quantum science and technology. </li>
        <li><a href="http://iciq.github.io/" target="_blank">ICIQ</a>: the open community stands for Information, Computation, Intelligence and Quantum.
          We have scientists, journalists, enterprineurs, students and many other professionals
          who are interested in crossing the boundaries between classical and quantum information sciences to shape the future and
          organize group studies, online talks, open discussions and news sharing.
          Check our <a href="https://plus.google.com/communities/112872767737673370045" target="_blank">Google+ community on quantum information science</a> (the biggest as of Feb 2016).</li>
       </ul>
      </div>

    </div>

  <div class="row">
    <h2 align="center">Sharing code repositories</h2>
    <div id="wrapper" class="grid clearfix">
      <div id="main" class="grid-1">
        <div><h2>Xiaodong Qi's Open-source Repositories</h2></div>
        <h4> This is an automated index to the top 12 public Github repositories managed by Xiaodong Qi.
          All of them are released under open-source initiative licenses,
          so you are free -- and invited! -- to use or adapt them as long as you
          acknowledge the source.  If you do use them, I hope you'll drop me
          a note by email.  I also encourage pull requests with corrections or
          improvements on these community common resources.</h4>
      </div>

      <div class="grid grid-3">
        <div id="statistics" class="grid-1 alpha header">
          <h1 style="margin: 5px 5px 0;">Statistics</h1>
          <p style="margin: 5px 5px 0px;"> <a href="https://github.com/{{site.author.github}}/repositories"><span id="num-repos">&nbsp;</span> public repos</a> </p>
          <p style="margin: 5px 5px 0px;"><a href="https://github.com/{{site.author.github}}">https://github.com/{{site.author.github}}</a></p>
        </div>

        <div id="recently-updated" class="grid-2 omega header">
          <h1 style="margin: 5px 5px 0;">Recently updated <a href="https://github.com/{{site.author.github}}/repositories">View All on GitHub</a></h1>
          <ol id="recently-updated-repos" style="margin-left: -15px; margin-top: 15px"></ol>
        </div>
      </div>

        <ol id="repos"></ol>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 col-xs-11">
     <h4> <a href="https://github.com/{{ site.author.github }}" onClick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;" >
      <img src="{{ site.baseurl }}/assets/img/icon-github.png" alt="github"> Coding </a></h4>
       <div class="excerpt" height="300px">
           <div class="scroll">
                {% github_feed i2000s, 5 %}
           </div>
       </div>
    </div>

    <div class="col-md-4 col-xs-11">
        <h4><a property="account" href="https://twitter.com/{{site.author.twitter}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Twitter'); return false;"><img src="{{ site.baseurl }}/assets/img/icon-twitter.png" height=45px alt="Twitter"> Discussing </a></h4>
        <div class="excerpt" height="300px">
            <div class="scroll">
                {% twitter_feed i2000s, 5 %}
            </div>
        </div>
     </div>

    <div class="col-md-4 col-xs-11">
     <h4> <a href="https://github.com/{{ site.author.github }}/{{site.author.readingrepo}}/commits/master/" onClick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;" >
      <img src="{{site.baseurl}}/assets/img/icon-stackoverflow.png" height=40px></img> Reading </a></h4>
       <div class="excerpt" height="300px">
           <div class="scroll">
                {% github_repo_feed i2000s, Archive, 5 %} <!-- The link is different for different people. Use author's github repo and readingrepo names here. -->
           </div>
       </div>
    </div>
  </div>

  <div class="row">
    <h2>Here are some <a href="{{site.baseurl}}/tools.html" target="_blank">tools I use for work</a>. </h2>
    <br>
  </div>

  <!--<div class="row">
    <h2>My pholosophy on Open Science can be found <a href="/philosophy.html" target="_blank">here</a>. </h2>
    <br>
  </div> -->


{% include footer.html %}
